Skip to content

ENH: truncate output of Groupby.groups #31388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Jan 28, 2020

Resurrection of #24853. Have resolved conflicts and updated according to the last review it received. The original PR fixed some unrelated minor typos, so I've kept them in (and added a fix for another absolutely minor typo I'd noticed)

@MarcoGorelli MarcoGorelli changed the title Feature/groupby repr ellipses 1135 ENH: truncate output of Groupby.groups Jan 28, 2020
@simonjayhawkins simonjayhawkins added Enhancement Groupby Output-Formatting __repr__ of pandas objects, to_string labels Jan 28, 2020
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoGorelli a few comments, the typing ones are not blockers.

benjaminarjun and others added 4 commits January 28, 2020 14:22
Roll back added params to __pprint_dict. All logic now in __repr__ def. Make tests more general

Remove unused line of code

Move truncated dict repr to Index.groupby()

Add correct groups object

A few misc items for the linter

Use pprint_thing in IndexGroupByGroups. Add whatsnew, docstring, and a couple typo fixes

Update tests to expect pprint formatting. Use new config location. Small update in doc.

Add nonsense to AUTHORS.md

Revert "Add nonsense to AUTHORS.md"

This reverts commit 9621669.
@MarcoGorelli MarcoGorelli force-pushed the feature/groupby-repr-ellipses-1135 branch from 70df886 to 5eb98e4 Compare January 28, 2020 14:30
@MarcoGorelli MarcoGorelli force-pushed the feature/groupby-repr-ellipses-1135 branch 3 times, most recently from a0bf2ac to b6b9751 Compare January 28, 2020 18:52
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MarcoGorelli lgtm.

@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Jan 28, 2020
@jreback jreback merged commit addfd7a into pandas-dev:master Jan 31, 2020
@jreback
Copy link
Contributor

jreback commented Jan 31, 2020

thanks @MarcoGorelli

@MarcoGorelli MarcoGorelli deleted the feature/groupby-repr-ellipses-1135 branch February 25, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Groupby Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

df.groupby('key').groups printed all: problem with large arrays
4 participants